{% extends "base.html" %}
{% block ref %}
<link rel="stylesheet" charset="utf-8" href="/admin/style/setting-blog.css">

<script type="text/javascript" charset="utf-8" src="/editor/editor_config.js"></script>
<script type="text/javascript" charset="utf-8" src="/editor/editor_all.js"></script>
<script type="text/javascript" charset="utf-8" src="/admin/script/jquery-1.7.2.min.js"></script>

<script>
function submit()
{
    document.forms[0].submit();
}
function cancel()
{
    window.location = "http://{{ host }}/admin/";
}
function checkChanged()
{
    var s = "";
    var inputs = $("input[type='checkbox'][id^='category']");
    for(var i=0; i<inputs.length; i++){
        if(inputs[i].checked){
            s += inputs[i].attributes["value"].value + ","
        }
    }
    var categories = $("#categories")[0];
    categories.value = s;
}
</script>
{% endblock %}

{% block content %}
<div id="content">
<div id="main">
<div class="blog-profile">
<div class="head">
<h1>博客设置</h1>
</div>
<div class="con">
<form action="" method="post" id="profile-form">
<ul class="list clearfix">
<li class="clearfix li normal">
    <div class="item-title">微博插件代码：</div>
    <div class="item">
        <textarea name="weibo-code" class="ui-textarea skin-textarea-willwhite" style="height: 92px; overflow-x: auto; overflow-y: auto; width: 420px; ">{{ weiboCode }}</textarea>
    </div>
</li>
<li class="clearfix li normal">
    <div class="item-title">评论插件代码：</div>
    <div class="item">
        <textarea name="blog-comment-code" class="ui-textarea skin-textarea-willwhite" style="height: 92px; overflow-x: auto; overflow-y: auto; width: 420px; ">{{ commentCode }}</textarea>
    </div>
</li>
<li class="clearfix li normal">
    <div class="item-title">最近评论插件代码：</div>
    <div class="item">
        <textarea name="blog-latest-comments-code" class="ui-textarea skin-textarea-willwhite" style="height: 92px; overflow-x: auto; overflow-y: auto; width: 420px; ">{{ latestCommentsCode }}</textarea>
    </div>
</li>
<li class="clearfix li normal">
    <div class="item-title">统计插件代码：</div>
    <div class="item">
        <textarea name="blog-statistics-code" class="ui-textarea skin-textarea-willwhite" style="height: 92px; overflow-x: auto; overflow-y: auto; width: 420px; ">{{ statisticsCode }}</textarea>
        <label>
            <input type="checkbox" name="blog-statistics-code-in-head"
                   {% if statisticsCodeInHead %}checked="checked"{% endif %}>强制置于head标签内
        </label>
    </div>
</li>
</ul>
</form>
<div class="clearfix panel">
<div class="clearfix submit-ct">
<div id="profile-submit">
    <div onclick="submit()" cloud="" id="ctrlbuttonprofile-submit" class="ui-button skin-button-willblue" style="width: 80px; ">
        <span class="ui-button-bg-left skin-button-willblue-bg-left"></span>
        <div id="ctrlbuttonprofile-submitlabel" class="ui-button-label skin-button-willblue-label">
            <span id="ctrlbuttonprofile-submittext" class="ui-button-text skin-button-willblue-text">保存</span>
        </div>
    </div>
</div>
</div>
</div>
</div>
</div>
</div>
{% include 'region-sidebar.html' %}
</div>
{% endblock %}